function [Y_net,C_net,C_m_net,C_n_net,I_m_net,I_n_net,N_m_net,N_n_net,W_net,A_net,Z_net,SigmaA_net,SigmaZ_net,R_net,Pi_net,MU_net,U_m_net,U_n_net,L_net,Alpha1_net,Lambda_net,vxo_vola_IRF_net]= save_irfs(orderI)
    
global setup_ scale_ M_ options_ uncertainty_shockI capitalI

pruningI              = 0;  %% set equal to one if you want pruning (DO NOT CHANGE)
hpfilterI             = 0;  %% set equal to one if you want second moments (DO NOT CHANGE)
irfI                  = 1;  %% set equal to one if you want GENERALIZED IRF (DO NOT CHANGE)
gen_irfI              = 0; % set equal to one if you want generalized IRF (DO NOT CHANGE)                             
stoch_ss_irfI         = 1; % set equal to one if you want IRF starting from stochastic ss (DO NOT CHANGE) 

irf_periods           = 50;

size_tfp  = (1-uncertainty_shockI);
size_tfpu = uncertainty_shockI;

scale_.zP                     = size_tfp;
scale_.UzP                    = size_tfpu;

input_dynare_toolbox

eps_z                         = zeros(1,setup_.lengthsimul);
eps_z(1,setup_.drop+1)        = scale_.zP;

eps_zu                        = zeros(1,setup_.lengthsimul);

load fig_number
if figure3==1 
    eps_zu(1,setup_.drop+1)       = 1.75*scale_.UzP;
end
if figure5==1 || figure4==1
    eps_zu(1,setup_.drop+1)       = 5*scale_.UzP; 
end

eps_3                         = zeros(1,setup_.lengthsimul);


setup_.shocks_matrix_external = vertcat(eps_z,eps_zu,eps_3);
output_toolbox_               = dynare_toolbox(M_,options_,setup_.order,setup_.type,setup_);


Ysss      = output_toolbox_.irf_matrix(strmatch('Y',setup_.names,'exact'),setup_.drop-1);
Csss      = output_toolbox_.irf_matrix(strmatch('C',setup_.names,'exact'),setup_.drop-1);
C_m_sss   = output_toolbox_.irf_matrix(strmatch('C_m',setup_.names,'exact'),setup_.drop-1);
C_n_sss   = output_toolbox_.irf_matrix(strmatch('C_n',setup_.names,'exact'),setup_.drop-1);

if capitalI==1
    I_m_sss   = output_toolbox_.irf_matrix(strmatch('I_m',setup_.names,'exact'),setup_.drop-1);
    I_n_sss   = output_toolbox_.irf_matrix(strmatch('I_n',setup_.names,'exact'),setup_.drop-1);
else
    I_m_sss   = 1;
    I_n_sss   = 1;
end

N_m_sss         = output_toolbox_.irf_matrix(strmatch('N_m',setup_.names,'exact'),setup_.drop-1);
N_n_sss         = output_toolbox_.irf_matrix(strmatch('N_n',setup_.names,'exact'),setup_.drop-1);
Lsss            = output_toolbox_.irf_matrix(strmatch('L',setup_.names,'exact'),setup_.drop-1);
Wsss            = output_toolbox_.irf_matrix(strmatch('W',setup_.names,'exact'),setup_.drop-1);
Asss            = output_toolbox_.irf_matrix(strmatch('a',setup_.names,'exact'),setup_.drop-1);
SigmaAss        = output_toolbox_.irf_matrix(strmatch('sigma_a',setup_.names,'exact'),setup_.drop-1);
Zsss            = output_toolbox_.irf_matrix(strmatch('PF_normalization',setup_.names,'exact'),setup_.drop-1);
SigmaZss        = output_toolbox_.irf_matrix(strmatch('sigma_z',setup_.names,'exact'),setup_.drop-1);
Rsss            = output_toolbox_.irf_matrix(strmatch('R',setup_.names,'exact'),setup_.drop-1);
Pisss           = output_toolbox_.irf_matrix(strmatch('Pi',setup_.names,'exact'),setup_.drop-1);
MUsss           = output_toolbox_.irf_matrix(strmatch('mu',setup_.names,'exact'),setup_.drop-1);
Alpha1sss       = output_toolbox_.irf_matrix(strmatch('alpha1_ex',setup_.names,'exact'),setup_.drop-1);
Lambdasss       = output_toolbox_.irf_matrix(strmatch('Lambda',setup_.names,'exact'),setup_.drop-1);
cond_var_R_Esss = output_toolbox_.irf_matrix(strmatch('cond_var_R_E',setup_.names,'exact'),setup_.drop-1);


Y_net        = 100*(output_toolbox_.irf_matrix(strmatch('Y',setup_.names,'exact'),setup_.drop+1:setup_.drop+irf_periods)./Ysss-1);
C_net        = 100*(output_toolbox_.irf_matrix(strmatch('C',setup_.names,'exact'),setup_.drop+1:setup_.drop+irf_periods)./Csss-1);
C_m_net     = 100*(output_toolbox_.irf_matrix(strmatch('C_m',setup_.names,'exact'),setup_.drop+1:setup_.drop+irf_periods)./C_m_sss-1);
C_n_net     = 100*(output_toolbox_.irf_matrix(strmatch('C_n',setup_.names,'exact'),setup_.drop+1:setup_.drop+irf_periods)./C_n_sss-1);

if capitalI==1
    I_m_net     = 100*(output_toolbox_.irf_matrix(strmatch('I_m',setup_.names,'exact'),setup_.drop+1:setup_.drop+irf_periods)./I_m_sss-1);
    I_n_net     = 100*(output_toolbox_.irf_matrix(strmatch('I_n',setup_.names,'exact'),setup_.drop+1:setup_.drop+irf_periods)./I_n_sss-1);
else
    I_m_net     = 100*(output_toolbox_.irf_matrix(strmatch('I_m',setup_.names,'exact'),setup_.drop+1:setup_.drop+irf_periods));
    I_n_net     = 100*(output_toolbox_.irf_matrix(strmatch('I_n',setup_.names,'exact'),setup_.drop+1:setup_.drop+irf_periods));
end

N_m_net     = 100*(output_toolbox_.irf_matrix(strmatch('N_m',setup_.names,'exact'),setup_.drop+1:setup_.drop+irf_periods)./N_m_sss-1);
N_n_net     = 100*(output_toolbox_.irf_matrix(strmatch('N_n',setup_.names,'exact'),setup_.drop+1:setup_.drop+irf_periods)./N_n_sss-1);
L_net        = 100*(output_toolbox_.irf_matrix(strmatch('L',setup_.names,'exact'),setup_.drop+1:setup_.drop+irf_periods)./Lsss - 1);
W_net        = 100*(output_toolbox_.irf_matrix(strmatch('W',setup_.names,'exact'),setup_.drop+1:setup_.drop+irf_periods)./Wsss - 1);
A_net        = 100*(output_toolbox_.irf_matrix(strmatch('a',setup_.names,'exact'),setup_.drop+1:setup_.drop+irf_periods)./Asss-1);
SigmaA_net   = 100*(output_toolbox_.irf_matrix(strmatch('sigma_a',setup_.names,'exact'),setup_.drop+1:setup_.drop+irf_periods)./SigmaAss-1);
R_net        = 100*(output_toolbox_.irf_matrix(strmatch('R',setup_.names,'exact'),setup_.drop+1:setup_.drop+irf_periods)./Rsss-1);
Pi_net       = 100*((output_toolbox_.irf_matrix(strmatch('Pi',setup_.names,'exact'),setup_.drop+1:setup_.drop+irf_periods)).^4 - 1) - 100*(Pisss^4 - 1);


MU_net       = 100*(output_toolbox_.irf_matrix(strmatch('mu',setup_.names,'exact'),setup_.drop+1:setup_.drop+irf_periods)./MUsss-1);
U_m_net      = 100*(output_toolbox_.irf_matrix(strmatch('u',setup_.names,'exact'),setup_.drop+1:setup_.drop+irf_periods)-1);
U_n_net      = 100*(output_toolbox_.irf_matrix(strmatch('u_n',setup_.names,'exact'),setup_.drop+1:setup_.drop+irf_periods)-1);

Z_net              = 100*(output_toolbox_.irf_matrix(strmatch('PF_normalization',setup_.names,'exact'),setup_.drop+1:setup_.drop+irf_periods)./Zsss-1);
SigmaZ_net         = 100*(output_toolbox_.irf_matrix(strmatch('sigma_z',setup_.names,'exact'),setup_.drop+1:setup_.drop+irf_periods) - SigmaZss);
Alpha1_net         = 100*(output_toolbox_.irf_matrix(strmatch('alpha1_ex',setup_.names,'exact'),setup_.drop+1:setup_.drop+irf_periods));
Lambda_net         = 100*(output_toolbox_.irf_matrix(strmatch('Lambda',setup_.names,'exact'),setup_.drop+1:setup_.drop+irf_periods)./Lambdasss-1);

vxo_shock    	   = 100*sqrt(4*output_toolbox_.irf_matrix(strmatch('cond_var_R_E',setup_.names,'exact'),setup_.drop+1:setup_.drop+irf_periods));
vxo_mean           = 100*sqrt(4*(cond_var_R_Esss));
vxo_vola_IRF_net   = 100*(vxo_shock/vxo_mean-1);

setup_.external_shocks = 0;



